/*
 * XML Type:  Currency
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.Currency
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML Currency(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class CurrencyImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.Currency
{
    
    public CurrencyImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName CURRATE$0 = 
        new javax.xml.namespace.QName("", "CURRATE");
    private static final javax.xml.namespace.QName CURSYM$2 = 
        new javax.xml.namespace.QName("", "CURSYM");
    
    
    /**
     * Gets the "CURRATE" element
     */
    public java.lang.String getCURRATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CURRATE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "CURRATE" element
     */
    public net.ofx.types.x2003.x04.RateType xgetCURRATE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RateType target = null;
            target = (net.ofx.types.x2003.x04.RateType)get_store().find_element_user(CURRATE$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "CURRATE" element
     */
    public void setCURRATE(java.lang.String currate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CURRATE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CURRATE$0);
            }
            target.setStringValue(currate);
        }
    }
    
    /**
     * Sets (as xml) the "CURRATE" element
     */
    public void xsetCURRATE(net.ofx.types.x2003.x04.RateType currate)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RateType target = null;
            target = (net.ofx.types.x2003.x04.RateType)get_store().find_element_user(CURRATE$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.RateType)get_store().add_element_user(CURRATE$0);
            }
            target.set(currate);
        }
    }
    
    /**
     * Gets the "CURSYM" element
     */
    public net.ofx.types.x2003.x04.CurrencyEnum.Enum getCURSYM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CURSYM$2, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.CurrencyEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "CURSYM" element
     */
    public net.ofx.types.x2003.x04.CurrencyEnum xgetCURSYM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CurrencyEnum target = null;
            target = (net.ofx.types.x2003.x04.CurrencyEnum)get_store().find_element_user(CURSYM$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "CURSYM" element
     */
    public void setCURSYM(net.ofx.types.x2003.x04.CurrencyEnum.Enum cursym)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CURSYM$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CURSYM$2);
            }
            target.setEnumValue(cursym);
        }
    }
    
    /**
     * Sets (as xml) the "CURSYM" element
     */
    public void xsetCURSYM(net.ofx.types.x2003.x04.CurrencyEnum cursym)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CurrencyEnum target = null;
            target = (net.ofx.types.x2003.x04.CurrencyEnum)get_store().find_element_user(CURSYM$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.CurrencyEnum)get_store().add_element_user(CURSYM$2);
            }
            target.set(cursym);
        }
    }
}
